﻿using CommonBase;
using CommonClass;
using InteractiveWhiteboardManagement.Base.Common;
using Microsoft.Practices.Prism.Regions;
using SurveillancePro.Base.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace SurveillancePro.ViewModels
{
    /// <summary>
    /// 视频页面容器
    /// </summary>
    public class ViewModel_VideoPanel : WorkspaceViewModel
    {
        #region 构造函数

        /// <summary>
        /// 
        /// </summary>
        /// <param name="regionManager"></param>
        /// <param name="viewName">对应的视图名称</param>
        /// <param name="titleText">标题名称</param>
        /// <param name="imageName">标题图片名称</param>
        /// <param name="canClose">是否显示关闭按钮</param>
        public ViewModel_VideoPanel(IRegionManager regionManager, string viewName,
            string titleText = null, string imageName = null,
            Visibility canClose = Visibility.Visible)
        {
            if (regionManager == null || string.IsNullOrWhiteSpace(viewName))
                return;
            if (string.IsNullOrWhiteSpace(titleText))
                titleText = "视频窗口";
            if (string.IsNullOrWhiteSpace(imageName))
                imageName = "Question";

            base.BaseRegionManager = regionManager;
            base.ViewName = viewName;
            base.HeaderTitle = titleText;
            base.HeaderImageSource = string.Format(ConstantString.IMAGE_URL, imageName);
            base.IsShowCloseButton = canClose;
        }

        #endregion

        #region Base Class Overrides

        protected override void OnDispose()
        {
        }

        #endregion
    }
}
